select * from home_live where id=` arr[i].id ` and active=1 and (enddate='0000-00-00' or enddate>'2024-05-08') and (startdate='0000-00-00' or startdate<='2024-05-08') order by startdate desc limit 1
Unknown column ' arr[i].id ' in 'where clause'